home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 23
/
Amiga Format AFCD23 (Feb 1998, Issue 107).iso
/
+look_here_1st!+
/
reader_requests
/
zkick301
/
zkick.i
< prev
Wrap
Text File
|
1997-11-28
|
2KB
|
107 lines
*************************************************************************
*
* Copyright (C) 1985, Commodore Amiga Inc. All rights reserved.
* Permission granted for non-commercial use
*
* asmsupp.i -- random low level assembly support routines
*
* Modified by Daniel Zenchelsky for use with ZKick
*
*************************************************************************
CLEAR MACRO ;quick way to clear a D register on 68000
MOVEQ #0,\1
ENDM
;BHS MACRO
; BCC.\0 \1 ;\0 is the extension used on the macro (such as ".s")
; ENDM
;BLO MACRO
; BCS.\0 \1
; ENDM
EVEN MACRO ; word align code stream
DS.W 0
ENDM
LINKSYS MACRO ; link to a library without having to see a _LVO
MOVE.L A6,-(SP)
MOVE.L \2,A6
JSR _LVO\1(A6)
MOVE.L (SP)+,A6
ENDM
CALLSYS MACRO ; call a library via A6 without having to see _LVO
JSR _LVO\1(A6)
ENDM
XLIB MACRO ; define a library reference without the _LVO
XREF _LVO\1
ENDM
;
; Put a message to the serial port at 9600 baud. Used as so:
;
; PUTMSG <'Init: called'>
;
XREF DPutStr
PUTMSG: MACRO * level,msg
TST.L _PRINT
beq end\@
MOVEM.L A0-A1/D0-D1,-(SP)
LEA msg\@,A0 ;Point to static format string
JSR DPutStr
MOVE.L #$000FFFFF,D0
loop\@ DBRA D0,loop\@
SUB.L #$10000,D0
BPL.S loop\@
MOVEM.L (SP)+,A0-A1/D0-D1
BRA.S end\@
msg\@ DC.B \1
DC.B 10
DC.B 0
DS.W 0
end\@
ENDM
;
; Put a message to the serial port at 9600 baud. Used as so:
;
; NS_PUTMSG <'Init: called'>
;
; Uses NO stack, but trashes a0,a1,d0,d1
;
XREF DPutStr
NS_PUTMSG: MACRO * level,msg
TST.L _PRINT
beq end\@
LEA msg\@,A0 ;Point to static format string
a1\@: MOVE.B (A0)+,D0
BEQ.S end\@
a3\@: MOVE.B $BFD000,D1
BTST #0,D1
BNE.S a3\@
MOVE.B #$FF,$BFE301
MOVE.B D0,$BFE101
BRA.S a1\@
msg\@: DC.B \1
DC.B 10
DC.B 0
DS.W 0
end\@:
ENDM